like

pure function like(pattern: text): boolean

Matches this text against the specified SQL LIKE pattern.

Use '_' to match any single character, and '%' to match any sequence of zero or more characters. The escape sequences '\\_', '\\%' and '\\\\' match the literal characters '_', '%' and '\' respectively.

Examples:

val names = ["Alice", "Victor", "Viktor", "Victoria", "V\\ctor"];
print(names @* { .like("Vi_tor") }); // prints [Victor, Viktor]
print(names @* { .like("Vic%") }); // prints [Victor, Victoria]
print(names @* { .like("V\\\\c%") }); // prints [V\ctor]

Since

0.10.4

Parameters

pattern

the pattern to match against

See also